package com.wyj.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.Map;

/**
 * Created by wuyj on 2018/7/1 0001.
 */
@Controller
public class HelloController {

    /*@RequestMapping({"/login.html", "/"})
    public String login() {
        return "login";
    }*/

    @RequestMapping("/hello")
    @ResponseBody
    public String hello() {
        return "hello spring boot";
    }

    @RequestMapping("/success")
    public String success(Map<String, Object> map) {
        map.put("hello", "chenluzhen");
        return "success";
    }
}
